package com.cskt.erptemplate.pojo;

import lombok.Data;

import java.util.Set;

/**
 * @Author 陈厚德
 * @Version 2.2
 */
public class LoginBo {


    private String token;

    /**
     * 用户信息
     */

    private UserInfoBo user;

    /**
     * 角色
     */

    private Set<String> roles;

    public LoginBo() {
    }

    public LoginBo(String token, UserInfoBo user, Set<String> roles) {
        this.token = token;
        this.user = user;
        this.roles = roles;
    }

    /**
     * 获取
     * @return token
     */
    public String getToken() {
        return token;
    }

    /**
     * 设置
     * @param token
     */
    public void setToken(String token) {
        this.token = token;
    }

    /**
     * 获取
     * @return user
     */
    public UserInfoBo getUser() {
        return user;
    }

    /**
     * 设置
     * @param user
     */
    public void setUser(UserInfoBo user) {
        this.user = user;
    }

    /**
     * 获取
     * @return roles
     */
    public Set<String> getRoles() {
        return roles;
    }

    /**
     * 设置
     * @param roles
     */
    public void setRoles(Set<String> roles) {
        this.roles = roles;
    }

    public String toString() {
        return "LoginBo{token = " + token + ", user = " + user + ", roles = " + roles + "}";
    }


    @Data
    public static class UserInfoBo  {

        private static final long serialVersionUID = 1L;

        /**
         * 姓名
         */
        private String name;

    }


}
